<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box{
      background-color: pink;
    }
    .div1{
      width: 100px;
      height: 100px;
      background-color: plum;
      float: left;
    }
    .div2{
      clear: both;
    }
    .father{
      background-color: plum;
    }
    .child{
      width: 100px;
      height: 100px;
      background-color: pink;
      float: left;
    }
    .father::after{
      content: "";
      display: block;
      clear: both;
    }
  </style>
</head>
<body>
  <!-- <div class="box">
    <div class="div1"></div>
    <div class="div2"></div>
  </div> -->
  <div class="father">
    <div class="child"></div>
  </div>
</body>
</html>